
lst = [89, 79, 67, 99, 78, 88, 38, 65]
# 从小到大排序
# 选择排序
def select_sort(lst):
    for i in range(len(lst)):
        min_index = i
        for j in range(i+1,len(lst)):
            if lst[min_index] > lst[j]:
                min_index = j
        lst[min_index],lst[i]=lst[i],lst[min_index]
    return lst


print(select_sort(lst))








# lst.sort()
# print(lst)